import BuffUtil from '@/BuffUtil';
import UnitStateUtil from '@/UnitStateUtil';
import UnitSpellEvent from '@/event/UnitSpellEvent';
import SelectCommon from 'code/Core/Common/SelectCommon';
export default class Item_梅肯斯姆 {
    static id = 'AIsl';
    static 名称: string = '梅肯斯姆';
    static 描述: string = '';
    static 图标: string = '';
    static 添加技能(目标: unit) {
        UnitAddAbility(目标, Item_梅肯斯姆.id);
    }
    static 释放(x: number, y: number, 来源?: unit, 目标?: unit, d?: any) {
        let us = SelectCommon.getAllyUnitInRange(来源, 1000);
        for (let u of us) {
            let life = UnitStateUtil.getMaxLife(u) * 0.05;
            DamageSystemInstance.applyHeal(u, 来源, 300 + life, 'AIsl');
            DestroyEffect(AddSpecialEffectTarget('Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl', u, 'origin'));
        }
    }
    constructor() {
        se.onUnitSpellEffect(Item_梅肯斯姆.spellEffect, Item_梅肯斯姆.id);
    }
    static spellEffect(this: void, d: UnitSpellEvent) {
        Item_梅肯斯姆.释放(d.spellTargetX, d.spellTargetY, d.trigUnit, d.spellTargetUnit, d);
    }
}
